Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic loading indicator to show processing #129

Merged
merged 33 commits into from
Oct 10, 2018

Conversation

maxmarkus
Copy link
Contributor

@maxmarkus maxmarkus commented Oct 5, 2018

  • Implemented loading indicator to automatically show on new iframe creation and hide triggered by Luigi init callback
  • added config params for completely disabling the indicator and for disabling auto-hide feature
  • added LuigiClient methods for show and hide: LuigiClient.uxManager().showLoadingIndicator() and LuigiClient.uxManager().hideLoadingIndicator()
  • updated externalExample.html to use Fundamental-UI and LuigiClient
  • added a demo indicator for externalExample.html
  • added unit and e2e tests
  • added documentation

Resolves #100 and #114

maxmarkus and others added 23 commits July 31, 2018 13:51
…d by Luigi init callback, added config params for completely disabling the indicator and for disabling auto-hide feature, added LuigiClient methods for show and hide, updated externalExampleHtml to use Fundamental-UI and LuigiClient and added a demo indicator there
@@ -73,6 +73,8 @@ window.Luigi.setConfig({
- **context** sends the specified object as context to the view. Use this parameter in combination with the dynamic **pathSegment** to receive the context through the context listeners of **Luigi client**. This is an alternative to using the dynamic value in the **viewUrl**.
- **defaultChildNode** sets the child node that Luigi activates automatically if the current node has no **viewUrl** defined. Provide **pathSegment** of the child node you want to activate as a string.
- **isolateView** renders the view in a new frame when you enter and leave the Node. This setting overrides the same-domain frame re-usage. The **isolateView** is disabled by default.
- **loadingIndicator.enabled** shows a loading indicator when switching between micro front-ends. Super fast micro front-ends might want to disable this feature. The **loadingIndicator.loadingIndicator** is enabled by default.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. ...when you switch between micro front-ends.
  2. "Super fast micro front-ends might want to disable this feature." -> Super fast micro front-ends are not humans so they cannot literally "want" anything. Please paraphrase.

Copy link
Contributor Author

@maxmarkus maxmarkus Oct 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like "If you have a super fast micro frontend, you can disable this feature to prevent loading indicator flickering."

Copy link
Contributor

@klaudiagrz klaudiagrz Oct 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two corrections:

  1. front-end as in the rest of the document
  2. prevent the flickering of the loading indicator. sounds better imho

@@ -73,6 +73,8 @@ window.Luigi.setConfig({
- **context** sends the specified object as context to the view. Use this parameter in combination with the dynamic **pathSegment** to receive the context through the context listeners of **Luigi client**. This is an alternative to using the dynamic value in the **viewUrl**.
- **defaultChildNode** sets the child node that Luigi activates automatically if the current node has no **viewUrl** defined. Provide **pathSegment** of the child node you want to activate as a string.
- **isolateView** renders the view in a new frame when you enter and leave the Node. This setting overrides the same-domain frame re-usage. The **isolateView** is disabled by default.
- **loadingIndicator.enabled** shows a loading indicator when switching between micro front-ends. Super fast micro front-ends might want to disable this feature. The **loadingIndicator.loadingIndicator** is enabled by default.
- **loadingIndicator.hideAutomatically** disables automatic hiding of the loading indicator. Use `LuigiClient.uxManager().hideLoadingIndicator()` to hide it manually in your micro front-end during startup. The **loadingIndicator.hideAutomatically** is enabled by default.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. the automatic hiding
  2. during the startup.

- **removeBackdrop()** removes the backdrop.
- **showLoadingIndicator()** adds a backdrop with a loading indicator for the micro front-end frame
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a dot at the end.

@jesusreal jesusreal self-assigned this Oct 8, 2018
Copy link
Contributor

@jesusreal jesusreal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggested some improvements, but other than that really good job. Kudos! :)

core/src/App.html Outdated Show resolved Hide resolved
docs/ux-manager.md Outdated Show resolved Hide resolved
core/test/routing.spec.js Show resolved Hide resolved
client/luigi-client.js Outdated Show resolved Hide resolved
core/test/routing.spec.js Outdated Show resolved Hide resolved
@jesusreal jesusreal added area/luigi enhancement New feature or request labels Oct 9, 2018
@maxmarkus
Copy link
Contributor Author

Docu for navigation-configuration.md and ux-manager.md got updated after approval, please check again @klaudiagrz

- **removeBackdrop()** removes the backdrop.
- **showLoadingIndicator()** adds a backdrop with a loading indicator for the micro front-end frame. This overrides the `loadingIndicator.enabled` setting.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loadingIndicator.enabled -> please make it bold as with the rest of the parameters

@maxmarkus maxmarkus merged commit a9194de into SAP:master Oct 10, 2018
@maxmarkus maxmarkus deleted the feature/loading-indicator branch October 10, 2018 09:25
stanleychh pushed a commit to stanleychh/luigi that referenced this pull request Dec 30, 2021
* Implemented loading indicator to automatically show and hide triggered by Luigi init callback, added config params for completely disabling the indicator and for disabling auto-hide feature, added LuigiClient methods for show and hide, updated externalExampleHtml to use Fundamental-UI and LuigiClient and added a demo indicator there

* added e2e tests for loading indicator

* added unit tests to check showLoadingIndicator value, added documentation

* manually applied prettier

* docu rephrasing

* docu updates

* refactoring based on PR comments

* added wait timeout again to prevent iframe selection failure

* extended loading indicator documentation

* small docu update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants